package com.fwmagic.redis;

import redis.clients.jedis.Jedis;

import java.util.Set;

public class StringValue {
    public static void main(String[] args) {
        Jedis jedis = new Jedis("192.168.62.131", 6379, 5000);

        jedis.set("name", "zhangsan");
        jedis.set("age", "23");

        String name = jedis.get("name");
        System.out.println(name);


     /*   Set<String> keys = jedis.keys("*");
        keys.forEach(System.out::println);*/

        //删除
        jedis.del("name");


        jedis.close();
    }
}
